package practice.w918;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class PwDemo {
    public static void main(String[] args) throws FileNotFoundException {
            FileOutputStream fos = new FileOutputStream("pw2.txt");
            OutputStreamWriter osw = new OutputStreamWriter(fos, StandardCharsets.UTF_8);
            BufferedWriter bw = new BufferedWriter(osw);
            PrintWriter pw = new PrintWriter(bw);
            pw.println("写信告诉我今天海是什么颜色 夜夜陪着你的海心情又如何");
            pw.println("灰色是不想说 蓝色是犹豫");
            System.out.println("写出完毕");
            pw.close();



//        FileOutputStream fos = new FileOutputStream("pw2.txt");
//        OutputStreamWriter osw = new OutputStreamWriter(fos, StandardCharsets.UTF_8);
//        BufferedWriter bw = new BufferedWriter(osw);
//        PrintWriter pw = new PrintWriter(bw);
//        pw.println("写信告诉我今天海是什么颜色 夜夜陪着你的海心情又如何");
//        pw.println("灰色是不想说 蓝色是犹豫");
//        System.out.println("写出完毕");
//        pw.close();

    }
}
